package com.haikesi.api.organization.domain.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * @ClassName OrganizationSearchVO
 * @Author HandsomeBugs
 * @Date 2019/4/30 9:28
 * @Version 1.0
 **/
@Data
@EqualsAndHashCode(callSuper = false)
public class OrganizationSearchVO implements Serializable {
    private static final long serialVersionUID = -1L;

    @ApiModelProperty(value = "组织机构名称")
    private String organizationName;

    @ApiModelProperty(value = "父级组织机构ID")
    private String parentId;


    @ApiModelProperty(value = "组织机构ID",hidden = true)
    private String organizationId;

    @ApiModelProperty(value = "是否筛选机构数据(1 是 0 否 默认为否)")
    private String isScreenOrganization;

    @ApiModelProperty(value = "页数")
    private Integer pageNum;
    @ApiModelProperty(value = "每页行数")
    private Integer pageSize;

    public Integer getPageNum() {
        if(pageNum == null){
            pageNum = 1;
        }
        return pageNum;
    }
    public Integer getPageSize() {
        if(pageSize == null){
            pageSize = 20;
        }
        if(pageSize > 100){
            pageSize = 100;
        }
        return pageSize;
    }
}
